<%--
  Created by IntelliJ IDEA.
  edu.sctu.User: Administrator
  Date: 2018/4/17
  Time: 16:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>判断</title>
</head>
<body style="background-image: url(image/500468332.jpg); background-size: 100%;">

<%

    String username = request.getParameter("username");
    String password = request.getParameter("password");

    if ("admin".equals(username) &&
            "123456".equals(password)) {
        //管理员登录
        out.write("登录成功！");

        boolean isLogin = true;

        session.setAttribute("isLogin", "true");
        response.sendRedirect("userList.jsp");

    } else {
        out.write("<p>管理员账号或密码错误。</p>");
        out.write("<meta http-equiv=\"refresh\" content=\"0.5;URL=http://localhost:8080/login0.jsp\">");
    }
%>


</body>
</html>
